home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripting / Intro / radiob.js < prev    next >
Encoding:
Text File  |  2005-04-04  |  1004 b   |  35 lines

  1. include("oops/r3radiob.js"); 
  2. include("oops/r3window.js"); 
  3. include("oops/r3packer.js"); 
  4.  
  5. // --- Create a window --
  6.  
  7. window = new r3Window(R3WGA_Parent, _r3gui,
  8.                       R3WA_ReportCloseWindow, TRUE,
  9.                       R3WA_ReportNewSize, TRUE,
  10.                       R3WA_Title, "Radio button Example");
  11. window.SetLeft(300);
  12. window.SetTop(200);
  13.  
  14. // -- create a geometry manager (packer) as usual
  15.  
  16. packer = new r3Packer(R3PA_Orientation, R3PAOF_VERTICAL); 
  17. window.SetGmanager(packer); 
  18.  
  19. // --- create a radiobutton --- 
  20.  
  21. function myRadiobuttonHook(obj, event, value)
  22. {
  23.     print("Selected " + value);
  24. }
  25.  
  26. radiob =  new r3Radiobutton(R3WGA_Parent, window,
  27.                             R3GRBA_Labels, ["Strength", "Brightness", "Age", "Weight"],
  28.                             R3RA_Hook, myRadiobuttonHook);
  29. radiob.SetToolTip("This is a tool tip");
  30.  
  31. packer.ADD(R3PAPF_EXPAND | R3PAPF_FILLX, R3PAAF_ALIGN, radiob);
  32.  
  33. window.FIT(R3WFP_BESTFIT); 
  34. window.REALIZE();
  35.